package com.bcbim.operation_maintenance.model_file.service;

import com.bcbim.operation_maintenance.model_file.mapper.ModelFileMapper;
import com.bcbim.operation_maintenance_interface.model_file.dao.ModelFileDAO;
import com.bcbim.operation_maintenance_interface.model_file.service.ModelFileService;
import com.bcbim.operation_maintenance_interface.model_file.vo.ModelFileIdVO;
import com.bcbim.operation_maintenance_interface.model_file.vo.ModelFileStatusVO;
import com.bcbim.operation_maintenance_interface.model_file.vo.ModelFileVO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @version V 1.0.0
 * @Description：
 * @Author: haomeijie
 * @Date: 2022/3/17 15:39
 **/
@Service(timeout = 60 * 1000, group = "modelFile", version = "1.0.0")
public class ModelFileServiceImpl implements ModelFileService {
    @Autowired
    private ModelFileMapper modelFileMapper;

    @Override
    public List<ModelFileVO> getModelByBuildId(String buildId) {
        return modelFileMapper.getModelByBuildId(buildId);
    }

    @Override
    public int insertModel(ModelFileDAO modelFileDAO) {
        return modelFileMapper.insertModel(modelFileDAO);
    }

    @Override
    public int updateModel(ModelFileDAO modelFileDAO) {
        return modelFileMapper.updateModel(modelFileDAO);
    }


    @Override
    public void batchUpdateModel(List<ModelFileStatusVO> list) {
        modelFileMapper.batchUpdateModel(list);
    }

    @Override
    public List<ModelFileIdVO> getModelFileIdByServerId() {
        return modelFileMapper.getModelFileIdByServerId();
    }

    @Override
    public int updateModelByBuildId(String buildId) {
        return modelFileMapper.updateModelByBuildId(buildId);
    }

}
